package com.apsfc.service.impl;

import com.apsfc.dao.TypeDao;
import com.apsfc.po.Type;
import com.apsfc.service.TypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 灯灯
 */
@Service("typeService")
public class TypeServiceImpl implements TypeService {

    @Autowired
    @Qualifier("typeDao")
    private TypeDao typeDao;

    @Override
    public int TypeAdd(Type type) {
        return typeDao.TypeAdd(type);
    }

    @Override
    public int TypeDelete(int id) {
        return typeDao.TypeDelete(id);
    }

    @Override
    public int TypeUpdate(Type type) {
        return typeDao.TypeUpdate(type);
    }

    @Override
    public Type findTypeById(int id) {
        return typeDao.findTypeById(id);
    }

    @Override
    public List<Type> getAllType() {
        return typeDao.getAllType();
    }
}
